<template>
	<view>
		<image src="/static/home.png" mode="widthFix" class="image posiab"></image>
		<view class="con" :style="{paddingTop:shh+'px'}">
			<back title="公告详情"></back>
		</view>
		 
		</view>
		<view class="con mt25 size26 mb20 posire">
			<view v-if="isdata" class="flex-ju-c mt8vh">
				<view class="flex-ju-c flex-col">
					<image mode="widthFix" class="width210 ra20" src="/static/nodata.png"></image>
					<view class=" size24">这里什么也没有~</view>
				</view>
			</view>
			
			<view v-for="(item,index) in list" @click="tapirtems(item)" :key="index"  class="borderE1E1E1 bgfff mt20 pg20 ra20">
				<view class="flex-a-i">
					<view>
						<image class="wh260-160 ra20" :src="item.thumb"></image>
					</view>
					<view class="ml20 flex1">
						<view class="two bold size26">{{item.title}}</view>
						<view class="flex-a-i size22 mt20">
							<view class="wh111-30 ra30 ml-10 flex-ju-c pg3" :class="theme?'colorFF6E44 borderFF6E44':'border000'">
								{{item.category.title}}
							</view>
							<view style="white-space: nowrap;" class="color999 ml10 size26 flex-a-i">{{item.updated_at}}</view>
						</view>
					</view>
				</view>
				
			</view>
		</view>
		
</template>
<script>
	export default {
		data() {
			return {
				 theme: uni.getStorageSync('theme'),
				tabIndex:0,
				categoryList:[],
				list:[],
				isdata:false,
			}
		},
		onLoad(e) {
			
			this.http('announcement/relatedAnnouncement', {
				product_id: e.id
			}).then(res => {
				this.list=res.data
				if(this.list.length){
					this.isdata = false
				}else{
					this.isdata = true
				}
			})
			
		},
		methods: {
			tapirtems(item) {
				uni.navigateTo({
					url: '/pages/zixun/detail?uuid=' + item.uuid
				})
			}
		}
	}
</script>

<style>

</style>
